﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QuanLyThuVien_2
{
    public partial class frmDangNhap : Form
    {
        public frmDangNhap()
        {
            InitializeComponent();
            this.Location = new Point(0, 0);
            this.Size = new Size(450, 300);
        }

        private void frmDangNhap_Load(object sender, EventArgs e)
        {
            ptxQuanLyThuVien.Image = Image.FromFile(@"imgDangNhap/titleQuanLyThuVien.png");
            ptxQuanLyThuVien.BackColor = Color.Transparent;
            btnDangNhap.Size = txtMatKhau.Size = txtTenTaiKhoan.Size = Image.FromFile(@"imgDangNhap/btnDangNhap.png").Size;
            btnDangNhap.Image = Image.FromFile(@"imgDangNhap/btnDangNhap.png");
            btnDangNhap.BackgroundImageLayout = ImageLayout.Stretch;
            btnDangNhap.Location = new Point(txtMatKhau.Location.X, txtMatKhau.Location.Y + (txtMatKhau.Location.Y - txtTenTaiKhoan.Location.Y));
            lnkQuenMatKhau.Location = new Point(lblTenTaiKhoan.Location.X, lblMatKhau.Location.Y + (lblMatKhau.Location.Y - lblTenTaiKhoan.Location.Y) + (btnDangNhap.Size.Height - lnkQuenMatKhau.Height) / 2);
            lblTenTaiKhoan.Font = lblMatKhau.Font = lnkQuenMatKhau.Font;
        }

        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            frmMainMenu frm = new frmMainMenu();
            frm.Show();
            this.Hide();
        }

    }
}
